import React, { Component } from "react";
import { connect } from "react-redux";
import { decrease, increase } from "../redux/actions/count";
class test1 extends Component {
  constructor(props) {
    super(props);
  }
  decrease = () => {
    this.props.dispatch(decrease);
  };
  increase = () => {
    this.props.dispatch(increase);
  };
  render() {
    return (
      <div>
        <button onClick={this.decrease}>减1</button>
        <button onClick={this.increase}>加1</button>
      </div>
    );
  }
}
export default connect((state) => {
  return {
    state: state,
  };
})(test1);
